package com.darkplanet.management.service;

import com.darkplanet.management.dao.FunDao;
import com.darkplanet.management.domain.Fun;
import com.darkplanet.management.domain.PRMFAll;


import java.util.List;

public class FunctionService implements IFunctionService {
    FunDao funDao=new FunDao();
    @Override
    public Fun getUserById(Integer fun_id) {
        Fun funUser = funDao.getUserById(fun_id);
        return funUser;
    }

    public void addFunUser(Integer model_id, String fun_name, String priority, String simple_desc, String complex_desc, String remark) {
           funDao.addFunUser(model_id,fun_name,priority,simple_desc,complex_desc,remark);
    }

    @Override
    public void deleteFunUser(Integer fun_id) {
            funDao.deleteFunUser(fun_id);
    }

    @Override
    public void updateFunUser(Integer model_id, String fun_name, String priority, String simple_desc, String complex_desc, String remark, Integer fun_id) {
                funDao.updateFunUser(model_id,fun_name,priority,simple_desc,complex_desc,remark,fun_id);
    }

    @Override
    public List getFunUser() {
        List funUsers = funDao.getFunUser();
        return funUsers;
    }

    @Override
    public List<PRMFAll> getFour() {
        FunDao funDao = new FunDao();
        return funDao.getFour();
    }


}
